FROM python:3.8.3

RUN mkdir /docker_api
WORKDIR /docker_api
COPY . /docker_api
COPY sysctl.conf /etc/sysctl.conf
RUN mkdir -p /pingtai_files/script_pag
RUN mkdir -p /pingtai_files/deploys
RUN mkdir -p /pingtai_files/uploads/gateway
RUN mkdir -p /pingtai_files/uploads/sensor
RUN mkdir -p /pingtai_files/uploads/dailys
RUN mkdir -p /pingtai_files/uploads/config
RUN mkdir -p /pingtai_files/uploads/agreement
RUN mkdir -p /pingtai_files/temp
RUN mkdir -p /pingtai_files/deploys_json
RUN mkdir -p /pingtai_files/json_config
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple celery==4.4.2
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple Django==2.2.4
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple django-cors-headers==3.7.0
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple django-redis==5.0.0
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple djangorestframework==3.12.4
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple itsdangerous==2.0.1
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple paho-mqtt==1.5.1
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple PyMySQL==1.0.2
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple redis==3.5.3
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple uwsgi
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple cryptography
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple requests
RUN pip3 install -i https://pypi.douban.com/simple amqtt

